<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>chinamap</title>
    <script src="../../build/datav.js"></script>
    <script src="../../lib/charts/chinamap.js"></script>
<style type="text/css">
#chart {
    border-top: 1px dashed #F00;
    border-bottom: 1px dashed #F00;
    padding-left: 20px;
}
</style>
  </head>

  <body>
    <div id="chart"></div>
    <script>
        //data
        var temperature = [
            ["AKESU",2,1997,5.67857142857143],
            ["ANKANG",4,2004,5.63333333333333],
            ["ANNING",4,2012,5.93333333333333],
            ["ANQING",4,2011,5.9],
            ["ANSHAN",5,2007,6.2258064516129],
            ["ANSHUN",11,2009,6.16666666666667],
            ["ANYANG",4,2002,6.03333333333333],
            ["BAICHENG",11,1996,5.8],
            ["BAISHAN",7,2006,5.90322580645161],
            ["BAIYIN",8,2011,6.12903225806452],
            ["BAODING",2,2008,6.24137931034483],
            ["BAOJI",7,1998,5.61290322580645],
            ["BAOSHAN",3,1996,5.70967741935484],
            ["BAOTOU",9,2004,5.8],
            ["BAZHONG",6,2005,5.96666666666667],
            ["BEIHAI",5,1999,5.90322580645161],
            ["BEIJING",4,2009,5.8],
            ["BENGBU",3,2001,6.25806451612903],
            ["BENXI",4,1997,5.56666666666667],
            ["BINZHOU",9,1999,6],
            ["BOLE",5,2005,6],
            ["BOZHOU",11,2000,6.06666666666667],
            ["CANGZHOU",4,2008,5.96666666666667],
            ["CHANGCHUN",10,2010,6.12903225806452],
            ["CHANGDE",8,1998,5.70967741935484],
            ["CHANGHAI",6,2003,6.06666666666667],
            ["CHANGJI",6,1996,6],
            ["CHANGLE",3,1998,5.7741935483871],
            ["CHANGSHA",3,2007,5.67741935483871],
            ["CHANGSHU",1,2000,5.74193548387097],
            ["CHANGZHI",5,2002,5.87096774193548],
            ["CHANGZHOU",12,2000,5.80645161290323],
            ["CHAOHU",6,1997,5.76666666666667],
            ["CHAOYANG",5,2001,5.70967741935484],
            ["CHAOZHOU",9,2009,6],
            ["CHENGDE",1,2004,5.61290322580645],
            ["CHENGDU",7,2009,5.7741935483871],
            ["CHENGGU",6,2010,6],
            ["CHENZHOU",12,2011,5.90322580645161],
            ["CHIBI",12,2010,6.03225806451613],
            ["CHIFENG",2,2008,5.86206896551724],
            ["CHISHUI",2,2002,5.75],
            ["CHIZHOU",9,2000,5.63333333333333],
            ["CHONGQING",3,1996,6.03225806451613],
            ["CHONGZUO",8,2007,6.06451612903226],
            ["CHUXIONG",12,1997,5.67741935483871],
            ["CHUZHOU",6,2008,6.16666666666667],
            ["CIXI",1,2006,5.93548387096774],
            ["CONGHUA",6,2010,5.8],
            ["DALI",11,2010,6.43333333333333],
            ["DALIAN",10,2001,6.35483870967742],
            ["DANDONG",11,2005,5.96666666666667],
            ["DANYANG",9,2000,6.56666666666667],
            ["DAQING",5,1997,6.12903225806452],
            ["DATONG",3,2001,5.96774193548387],
            ["DAZHOU",8,2010,5.67741935483871],
            ["DEYANG",8,1996,5.87096774193548],
            ["DEZHOU",4,2012,5.9],
            ["DONGGUAN",4,2002,6.03333333333333],
            ["DONGYANG",9,2008,6.26666666666667],
            ["DONGYING",3,1996,6.12903225806452],
            ["DOUYUN",8,2010,5.90322580645161],
            ["DUNHUA",5,2009,6.19354838709677],
            ["EERDUOSI",10,2002,6.06451612903226],
            ["ENSHI",6,2004,6],
            ["EZHOU",12,2008,5.83870967741935],
            ["FANGCHENGGANG",9,2003,6.03333333333333],
            ["FEICHENG",12,2001,5.70967741935484],
            ["FENGHUA",5,2007,5.90322580645161],
            ["FOSHAN",8,2007,5.96774193548387],
            ["FULING",4,2008,5.93333333333333],
            ["FUQING",4,2006,5.6],
            ["FUSHUN",6,1997,5.83333333333333],
            ["FUXIN",8,2001,6],
            ["FUYANG",4,1996,5.9],
            ["FUYANG1",5,2005,5.61290322580645],
            ["FUZHOU",11,2007,5.8],
            ["FUZHOU1",7,2000,5.93548387096774],
            ["GANYU",12,2011,5.7741935483871],
            ["GANZHOU",8,2011,5.87096774193548],
            ["GAOMING",2,2002,6.07142857142857],
            ["GAOYOU",12,2007,6.09677419354839],
            ["GEERMU",12,1996,6],
            ["GEJIU",10,2009,6.70967741935484],
            ["GONGYI",8,2012,5.80645161290323],
            ["GONGZHULING",11,2007,5.73333333333333],
            ["GUANGAN",8,2006,6],
            ["GUANGYUAN",11,1996,5.73333333333333],
            ["GUANGZHOU",10,1999,5.83870967741935],
            ["GUBAOTOU",8,1996,6.09677419354839],
            ["GUIGANG",2,1997,6.07142857142857],
            ["GUILIN",9,1998,5.96666666666667],
            ["GUIYANG",4,2004,5.86666666666667],
            ["GUYUAN",10,1998,6],
            ["HAERBIN",6,2011,6.4],
            ["HAICHENG",4,2011,6.06666666666667],
            ["HAIKOU",2,2001,5.78571428571429],
            ["HAIMEN",9,2001,5.8],
            ["HAINING",8,2000,5.80645161290323],
            ["HAMI",5,2008,5.83870967741935],
            ["HANDAN",11,1998,6.1],
            ["HANGZHOU",5,2003,5.80645161290323],
            ["HANZHONG",9,2002,6.03333333333333],
            ["HEBI",6,2003,6.23333333333333],
            ["HEFEI",4,1998,5.83333333333333],
            ["HENGSHUI",12,2010,5.74193548387097],
            ["HENGYANG",7,2002,5.74193548387097],
            ["HETIAN",1,2001,5.61290322580645],
            ["HEYUAN",7,2004,5.7741935483871],
            ["HEZE",10,2004,5.87096774193548],
            ["HUADOU",1,1997,6.12903225806452],
            ["HUAIAN",10,1998,6],
            ["HUAIBEI",9,2011,5.9],
            ["HUAIHUA",12,2003,6.09677419354839],
            ["HUAINAN",3,2002,5.96774193548387],
            ["HUANGGANG",1,2002,5.58064516129032],
            ["HUANGSHAN",12,2009,6.29032258064516],
            ["HUANGSHI",5,2006,5.67741935483871],
            ["HUHEHAOTE",12,2009,6.03225806451613],
            ["HUIZHOU",2,2002,5.92857142857143],
            ["HULUDAO",6,2006,5.96666666666667],
            ["HUZHOU",10,2010,5.83870967741935],
            ["JIAMUSI",9,2003,6.23333333333333],
            ["JIAN",4,1996,5.8],
            ["JIANGDOU",7,2005,5.93548387096774],
            ["JIANGMEN",3,2004,6.12903225806452],
            ["JIANGYAN",4,2005,5.9],
            ["JIANGYIN",3,1996,5.83870967741935],
            ["JIANGYOU",7,2003,5.87096774193548],
            ["JIAONAN",3,1998,5.80645161290323],
            ["JIAOZHOU",7,2002,5.90322580645161],
            ["JIAOZUO",8,2010,6.19354838709677],
            ["JIASHAN",7,1999,5.80645161290323],
            ["JIAXING",9,2001,5.93333333333333],
            ["JIEXIU",3,2006,5.87096774193548],
            ["JILIN",2,2002,6],
            ["JIMO",11,1997,6.03333333333333],
            ["JINAN",9,2002,6.06666666666667],
            ["JINCHENG",1,1997,5.64516129032258],
            ["JINGDEZHEN",6,2004,5.93333333333333],
            ["JINGHONG",3,2001,6.12903225806452],
            ["JINGJIANG",5,2005,5.83870967741935],
            ["JINGMEN",8,2008,6],
            ["JINGZHOU",2,2006,5.85714285714286],
            ["JINHUA",6,2007,5.86666666666667],
            ["JINING",12,2009,6.06451612903226],
            ["JINING1",12,2006,5.80645161290323],
            ["JINJIANG",12,2007,5.96774193548387],
            ["JINTAN",5,2005,5.80645161290323],
            ["JINZHONG",5,2004,5.7741935483871],
            ["JINZHOU",6,2002,5.6],
            ["JISHOU",3,2005,5.90322580645161],
            ["JIUJIANG",2,1998,6.07142857142857],
            ["JIUQUAN",1,2001,5.90322580645161],
            ["JIXI",3,2002,5.83870967741935],
            ["JIYUAN",11,2001,5.93333333333333],
            ["JURONG",9,2005,5.86666666666667],
            ["KAIFENG",7,2006,5.93548387096774],
            ["KAILI",12,2004,5.87096774193548],
            ["KAIPING",10,2001,5.70967741935484],
            ["KAIYUAN",1,2008,5.93548387096774],
            ["KASHEN",1,1999,5.80645161290323],
            ["KELAMAYI",4,1997,5.93333333333333],
            ["KUERLE",11,2005,5.7],
            ["KUITUN",10,2006,5.64516129032258],
            ["KUNMING",2,2011,6.14285714285714],
            ["KUNSHAN",1,1996,6],
            ["LAIBIN",7,2008,6],
            ["LAIWU",9,2001,5.7],
            ["LAIXI",1,1998,5.7741935483871],
            ["LAIZHOU",3,2003,5.90322580645161],
            ["LANGFANG",7,1997,5.83870967741935],
            ["LANZHOU",2,2000,5.89655172413793],
            ["LASA",10,2010,5.80645161290323],
            ["LESHAN",1,1997,6.09677419354839],
            ["LIANYUNGANG",6,1999,5.96666666666667],
            ["LIAOCHENG",3,2000,6.03225806451613],
            ["LIAOYANG",12,2011,6.54838709677419],
            ["LIAOYUAN",6,2001,5.96666666666667],
            ["LIJIANG",7,2012,6],
            ["LILING",2,2004,6.06896551724138],
            ["LINAN",9,2006,6.03333333333333],
            ["LINCANG",9,2003,5.8],
            ["LINFEN",2,1997,5.92857142857143],
            ["LINGBAO",11,2001,6],
            ["LINHE",10,2006,5.83870967741935],
            ["LINXIA",8,2002,5.87096774193548],
            ["LINYI",12,1997,5.64516129032258],
            ["LISHUI",6,1998,5.73333333333333],
            ["LIUAN",7,2005,5.64516129032258],
            ["LIUPANSHUI",2,2000,6.24137931034483],
            ["LIUZHOU",11,2010,5.93333333333333],
            ["LIYANG",4,2003,6.3],
            ["LONGHAI",12,1996,5.87096774193548],
            ["LONGYAN",11,1996,6.1],
            ["LOUDI",12,2007,5.54838709677419],
            ["LUOHE",2,2006,6.17857142857143],
            ["LUOYANG",1,2006,5.61290322580645],
            ["LUXI",5,2007,5.90322580645161],
            ["LUZHOU",5,2007,5.90322580645161],
            ["LVLIANG",8,1999,5.90322580645161],
            ["LVSHUN",1,2006,5.83870967741935],
            ["MAANSHAN",11,2002,5.93333333333333],
            ["MAOMING",1,2001,6.03225806451613],
            ["MEIHEKOU",2,2002,5.78571428571429],
            ["MEISHAN",9,2009,5.7],
            ["MEIZHOU",1,2010,5.67741935483871],
            ["MIANXIAN",2,2010,5.78571428571429],
            ["MIANYANG",7,2011,6],
            ["MUDANJIANG",12,2010,5.64516129032258],
            ["NANAN",6,2005,5.83333333333333],
            ["NANCHANG",9,1999,5.7],
            ["NANCHONG",10,1998,6.06451612903226],
            ["NANJING",10,2000,6.03225806451613],
            ["NANNING",12,1997,6.03225806451613],
            ["NANPING",9,2000,5.96666666666667],
            ["NANTONG",4,2009,5.86666666666667],
            ["NANYANG",10,2009,6.29032258064516],
            ["NEIJIANG",10,1996,6.06451612903226],
            ["NINGBO",3,2007,5.67741935483871],
            ["NINGDE",10,1998,5.83870967741935],
            ["PANJIN",1,1999,5.93548387096774],
            ["PANZHIHUA",10,2006,6.16129032258065],
            ["PENGLAI",11,2008,5.86666666666667],
            ["PINGDINGSHAN",6,2001,6.03333333333333],
            ["PINGDU",6,1999,6.1],
            ["PINGHU",7,2002,5.64516129032258],
            ["PINGLIANG",12,2007,5.80645161290323],
            ["PINGXIANG",8,1998,5.93548387096774],
            ["PULANDIAN",6,2012,6.23333333333333],
            ["PUNING",10,1996,5.64516129032258],
            ["PUTIAN",8,2008,6.03225806451613],
            ["PUYANG",12,1999,5.80645161290323],
            ["QIANNAN",2,1997,5.82142857142857],
            ["QIDONG",1,2001,6.09677419354839],
            ["QINGDAO",10,2011,6.12903225806452],
            ["QINGYANG",2,2010,6.14285714285714],
            ["QINGYUAN",8,2007,5.87096774193548],
            ["QINGZHOU",7,2008,6.03225806451613],
            ["QINHUANGDAO",1,2003,5.93548387096774],
            ["QINZHOU",1,2011,5.90322580645161],
            ["QIONGHAI",2,2007,5.89285714285714],
            ["QIQIHAER",12,2005,6.2258064516129],
            ["QITAIHE",3,2008,5.93548387096774],
            ["QUANZHOU",9,1999,5.86666666666667],
            ["QUJING",10,2010,5.7741935483871],
            ["QUZHOU",2,2009,5.96428571428571],
            ["RIKAZE",1,1996,5.74193548387097],
            ["RIZHAO",6,2010,5.7],
            ["RONGCHENG",11,2004,6.16666666666667],
            ["RUGAO",2,2002,5.82142857142857],
            ["RUIAN",6,2001,5.66666666666667],
            ["RUSHAN",3,2010,6.12903225806452],
            ["SANMENXIA",4,2009,5.63333333333333],
            ["SANMING",3,1997,6.03225806451613],
            ["SANYA",9,2007,5.73333333333333],
            ["SHAN",4,1998,5.8],
            ["SHANGHAI",5,2011,5.74193548387097],
            ["SHANGLUO",8,2001,6.09677419354839],
            ["SHANGQIU",2,2004,5.62068965517241],
            ["SHANGRAO",2,2010,6.32142857142857],
            ["SHANGYU",9,2006,6.13333333333333],
            ["SHANTOU",1,2008,5.7741935483871],
            ["SHAOGUAN",4,2005,6.23333333333333],
            ["SHAOWU",5,2012,6.06451612903226],
            ["SHAOXING",8,2009,5.70967741935484],
            ["SHAOYANG",4,2005,6.1],
            ["SHENYANG",1,2003,6.03225806451613],
            ["SHENZHEN",12,2007,5.87096774193548],
            ["SHEXIAN",4,1996,5.76666666666667],
            ["SHIHEZI",7,1999,6.09677419354839],
            ["SHIJIAZHUANG",5,1996,5.87096774193548],
            ["SHILIN",4,2011,6.1],
            ["SHISHI",2,2005,5.96428571428571],
            ["SHIYAN",2,2004,5.89655172413793],
            ["SHOUGUANG",2,2003,5.85714285714286],
            ["SHUANGYASHAN",10,2005,6],
            ["SHUOZHOU",3,2010,5.96774193548387],
            ["SHUYANG",8,1997,5.90322580645161],
            ["SIMAO",2,2009,5.89285714285714],
            ["SIPING",7,2002,6.2258064516129],
            ["SONGJIANG",3,2011,5.70967741935484],
            ["SONGYUAN",6,2003,5.83333333333333],
            ["SUINING",2,2010,6.07142857142857],
            ["SUIZHOU",2,2004,5.72413793103448],
            ["SUQIAN",10,2010,5.80645161290323],
            ["SUYU",11,2006,5.8],
            ["SUZHOU",2,2006,5.89285714285714],
            ["SUZHOU1",1,2004,5.93548387096774],
            ["TACHENG",3,1996,5.80645161290323],
            ["TAIAN",7,2003,5.54838709677419],
            ["TAICANG",2,1997,5.60714285714286],
            ["TAIXING",6,2010,5.96666666666667],
            ["TAIYUAN",9,2012,5.83333333333333],
            ["TAIZHOU",7,2010,5.80645161290323],
            ["TAIZHOU1",6,2010,6.03333333333333],
            ["TANGSHAN",2,1997,6.25],
            ["TENGCHONG",11,2005,5.7],
            ["TENGZHOU",4,2006,5.7],
            ["TIANJIN",6,2000,5.83333333333333],
            ["TIANMEN",11,1999,5.7],
            ["TIANSHUI",6,2012,5.86666666666667],
            ["TIELING",12,2005,5.90322580645161],
            ["TONGCHUAN",9,1997,5.76666666666667],
            ["TONGHUA",8,2012,5.90322580645161],
            ["TONGLIAO",4,2011,5.93333333333333],
            ["TONGLING",7,2009,5.96774193548387],
            ["TONGLU",11,2005,5.86666666666667],
            ["TONGREN",8,1998,5.7741935483871],
            ["TONGXIANG",7,2012,5.93548387096774],
            ["TONGZHOU",3,1998,6.09677419354839],
            ["TULUFAN",9,2004,5.9],
            ["WAFANGDIAN",4,2000,5.9],
            ["WANZHOU",7,1997,6],
            ["WEIFANG",11,2011,6.1],
            ["WEIHAI",1,2007,6.19354838709677],
            ["WEINAN",4,2002,5.7],
            ["WENDENG",9,2007,6.06666666666667],
            ["WENLING",8,1999,5.93548387096774],
            ["WENZHOU",9,1997,5.8],
            ["WUHAI",11,2006,6.23333333333333],
            ["WUHAN",12,2008,6.16129032258065],
            ["WUHU",1,2002,5.96774193548387],
            ["WUJIANG",7,2010,5.87096774193548],
            ["WULANHAOTE",11,1999,6.03333333333333],
            ["WULUMUQI",8,2001,5.83870967741935],
            ["WUWEI",2,1999,5.78571428571429],
            ["WUXI",9,2004,5.66666666666667],
            ["WUZHOU",12,2010,6.16129032258065],
            ["XIAMEN",2,2012,5.93103448275862],
            ["XIAN",5,2009,5.80645161290323],
            ["XIANGCHENG",2,1999,5.60714285714286],
            ["XIANGFAN",12,2009,5.80645161290323],
            ["XIANGGELILA",8,2006,5.96774193548387],
            ["XIANGSHAN",6,1998,6.03333333333333],
            ["XIANGTAN",2,1997,5.89285714285714],
            ["XIANGXIANG",9,2001,5.8],
            ["XIANGYIN",9,1999,5.93333333333333],
            ["XIANNING",12,2001,5.83870967741935],
            ["XIANTAO",10,2007,5.51612903225806],
            ["XIANYANG",5,2010,5.74193548387097],
            ["XIAOSHAN",9,1996,5.7],
            ["XICANG",5,2007,5.61290322580645],
            ["XICHANG",3,2003,5.96774193548387],
            ["XINGHUA",10,2011,5.93548387096774],
            ["XINGTAI",4,2011,6],
            ["XINGYI",10,2007,5.64516129032258],
            ["XINING",1,1998,5.70967741935484],
            ["XINJI",7,2003,5.64516129032258],
            ["XINXIANG",7,2008,5.96774193548387],
            ["XINYANG",5,2011,5.7741935483871],
            ["XINYU",7,2003,5.7741935483871],
            ["XINZHOU",2,2000,6.06896551724138],
            ["XUANCHENG",12,2000,5.7741935483871],
            ["XUANHUA",7,2009,5.83870967741935],
            ["XUCHANG",11,2004,5.73333333333333],
            ["XUZHOU",11,2000,5.96666666666667],
            ["YAAN",11,2005,5.86666666666667],
            ["YAKESHI",11,2006,5.73333333333333],
            ["YANAN",9,2001,6.2],
            ["YANBIAN",11,2001,5.73333333333333],
            ["YANCHENG",12,1997,6],
            ["YANGJIANG",4,1999,5.7],
            ["YANGQUAN",5,1996,5.70967741935484],
            ["YANGZHOU",4,2009,5.9],
            ["YANJI",9,2007,5.76666666666667],
            ["YANTAI",1,2008,5.7741935483871],
            ["YANZHOU",6,2004,5.8],
            ["YIBIN",1,2010,5.90322580645161],
            ["YICHANG",12,2002,6.03225806451613],
            ["YICHUN",12,1998,6.06451612903226],
            ["YICHUN1",4,1997,5.73333333333333],
            ["YILI",2,2011,6.10714285714286],
            ["YINCHUAN",3,2002,5.64516129032258],
            ["YINGKOU",9,2012,5.8],
            ["YINGTAN",5,2000,6],
            ["YINING",8,2008,5.58064516129032],
            ["YIWU",1,2007,5.7741935483871],
            ["YIXING",10,2010,6],
            ["YIYANG",7,2011,6.2258064516129],
            ["YONGKANG",9,2011,5.83333333333333],
            ["YONGZHOU",10,1997,6.35483870967742],
            ["YUEYANG",12,1996,6.51612903225806],
            ["YUHUAN",7,2006,5.83870967741935],
            ["YULIN",9,2008,5.96666666666667],
            ["YULIN1",9,1998,5.66666666666667],
            ["YUNCHENG",10,1996,5.7741935483871],
            ["YUXI",11,2005,5.8],
            ["YUYAO",8,2010,5.96774193548387],
            ["ZAOZHUANG",7,2011,6.09677419354839],
            ["ZENGCHENG",3,2010,6.16129032258065],
            ["ZHANGJIAGANG",11,1997,5.66666666666667],
            ["ZHANGJIAJIE",11,2011,6.03333333333333],
            ["ZHANGJIAKOU",7,2008,5.67741935483871],
            ["ZHANGQIU",2,2012,6],
            ["ZHANGYE",11,1999,5.96666666666667],
            ["ZHANGZHOU",2,2007,6.5],
            ["ZHANJIANG",10,2005,5.54838709677419],
            ["ZHAODONG",7,2011,5.80645161290323],
            ["ZHAOQING",4,2003,6],
            ["ZHAOTONG",6,2007,5.56666666666667],
            ["ZHENGZHOU",3,2001,5.61290322580645],
            ["ZHENJIANG",11,2001,5.96666666666667],
            ["ZHONGSHAN",3,2000,5.83870967741935],
            ["ZHOUKOU",3,2000,6.19354838709677],
            ["ZHOUSHAN",4,2005,5.8],
            ["ZHUCHENG",3,2005,5.80645161290323],
            ["ZHUHAI",6,2007,5.93333333333333],
            ["ZHUJI",8,2009,5.83870967741935],
            ["ZHUMADIAN",10,2010,5.96774193548387],
            ["ZHUZHOU",4,2001,5.9],
            ["ZIBO",8,2001,5.83870967741935],
            ["ZIGONG",5,2002,5.64516129032258],
            ["ZIYANG",3,1998,5.70967741935484],
            ["ZOUCHENG",4,1997,6.1],
            ["ZUNYI",7,1996,6.09677419354839]
        ];

        //pingyin to chinese
        var enToCn = {
            BEIJING: "北京",
            SHANGHAI: "上海",
            TIANJIN: "天津",
            CHONGQING: "重庆",
            AKESU: "阿克苏",
            ANNING: "安宁",
            ANQING: "安庆",
            ANSHAN: "鞍山",
            ANSHUN: "安顺",
            ANYANG: "安阳",
            BAICHENG: "白城",
            BAISHAN: "白山",
            BAIYIN: "白银",
            BENGBU: "蚌埠",
            BAODING: "保定",
            BAOJI: "宝鸡",
            BAOSHAN: "保山",
            BAZHONG: "巴中",
            BEIHAI: "北海",
            BENXI: "本溪",
            BINZHOU: "滨州",
            BOLE: "博乐",
            BOZHOU: "亳州",
            CANGZHOU: "沧州",
            CHANGDE: "常德",
            CHANGJI: "昌吉",
            CHANGSHU: "常熟",
            CHANGZHOU: "常州",
            CHAOHU: "巢湖",
            CHAOYANG: "朝阳",
            CHAOZHOU: "潮州",
            CHENGDE: "承德",
            CHENGDU: "成都",
            CHENGGU: "城固",
            CHENZHOU: "郴州",
            CHIBI: "赤壁",
            CHIFENG: "赤峰",
            CHISHUI: "赤水",
            CHIZHOU: "池州",
            CHONGZUO: "崇左",
            CHUXIONG: "楚雄",
            CHUZHOU: "滁州",
            CIXI: "慈溪",
            CONGHUA: "从化",
            DALI: "大理",
            DALIAN: "大连",
            DANDONG: "丹东",
            DANYANG: "丹阳",
            DAQING: "大庆",
            DATONG: "大同",
            DAZHOU: "达州",
            DEYANG: "德阳",
            DEZHOU: "德州",
            DONGGUAN: "东莞",
            DONGYANG: "东阳",
            DONGYING: "东营",
            DOUYUN: "都匀",
            DUNHUA: "敦化",
            EERDUOSI: "鄂尔多斯",
            ENSHI: "恩施",
            FANGCHENGGANG: "防城港",
            FEICHENG: "肥城",
            FENGHUA: "奉化",
            FUSHUN: "抚顺",
            FUXIN: "阜新",
            FUYANG: "阜阳",
            FUYANG1: "富阳",
            FUZHOU: "福州",
            FUZHOU1: "抚州",
            GANYU: "赣榆",
            GANZHOU: "赣州",
            GAOMING: "高明",
            GAOYOU: "高邮",
            GEERMU: "格尔木",
            GEJIU: "个旧",
            GONGYI: "巩义",
            GUANGAN: "广安",
            GUANGYUAN: "广元",
            GUANGZHOU: "广州",
            GUBAOTOU: "古包头",
            GUIGANG: "贵港",
            GUILIN: "桂林",
            GUIYANG: "贵阳",
            GUYUAN: "固原",
            HAERBIN: "哈尔滨",
            HAICHENG: "海城",
            HAIKOU: "海口",
            HAIMEN: "海门",
            HAINING: "海宁",
            HAMI: "哈密",
            HANDAN: "邯郸",
            HANGZHOU: "杭州",
            HANZHONG: "汉中",
            HEBI: "鹤壁",
            HEFEI: "合肥",
            HENGSHUI: "衡水",
            HENGYANG: "衡阳",
            HETIAN: "和田",
            HEYUAN: "河源",
            HEZE: "菏泽",
            HUADOU: "花都",
            HUAIAN: "淮安",
            HUAIBEI: "淮北",
            HUAIHUA: "怀化",
            HUAINAN: "淮南",
            HUANGGANG: "黄冈",
            HUANGSHAN: "黄山",
            HUANGSHI: "黄石",
            HUHEHAOTE: "呼和浩特",
            HUIZHOU: "惠州",
            HULUDAO: "葫芦岛",
            HUZHOU: "湖州",
            JIAMUSI: "佳木斯",
            JIAN: "吉安",
            JIANGDOU: "江都",
            JIANGMEN: "江门",
            JIANGYIN: "江阴",
            JIAONAN: "胶南",
            JIAOZHOU: "胶州",
            JIAOZUO: "焦作",
            JIASHAN: "嘉善",
            JIAXING: "嘉兴",
            JIEXIU: "介休",
            JILIN: "吉林",
            JIMO: "即墨",
            JINAN: "济南",
            JINCHENG: "晋城",
            JINGDEZHEN: "景德镇",
            JINGHONG: "景洪",
            JINGJIANG: "靖江",
            JINGMEN: "荆门",
            JINGZHOU: "荆州",
            JINHUA: "金华",
            JINING1: "集宁",
            JINING: "济宁",
            JINJIANG: "晋江",
            JINTAN: "金坛",
            JINZHONG: "晋中",
            JINZHOU: "锦州",
            JISHOU: "吉首",
            JIUJIANG: "九江",
            JIUQUAN: "酒泉",
            JIXI: "鸡西",
            JIYUAN: "济源",
            JURONG: "句容",
            KAIFENG: "开封",
            KAILI: "凯里",
            KAIPING: "开平",
            KAIYUAN: "开远",
            KASHEN: "喀什",
            KELAMAYI: "克拉玛依",
            KUERLE: "库尔勒",
            KUITUN: "奎屯",
            KUNMING: "昆明",
            KUNSHAN: "昆山",
            LAIBIN: "来宾",
            LAIWU: "莱芜",
            LAIXI: "莱西",
            LAIZHOU: "莱州",
            LANGFANG: "廊坊",
            LANZHOU: "兰州",
            LASA: "拉萨",
            LESHAN: "乐山",
            LIANYUNGANG: "连云港",
            LIAOCHENG: "聊城",
            LIAOYANG: "辽阳",
            LIAOYUAN: "辽源",
            LIJIANG: "丽江",
            LINAN: "临安",
            LINCANG: "临沧",
            LINFEN: "临汾",
            LINGBAO: "灵宝",
            LINHE: "临河",
            LINXIA: "临夏",
            LINYI: "临沂",
            LISHUI: "丽水",
            LIUAN: "六安",
            LIUPANSHUI: "六盘水",
            LIUZHOU: "柳州",
            LIYANG: "溧阳",
            LONGHAI: "龙海",
            LONGYAN: "龙岩",
            LOUDI: "娄底",
            LUOHE: "漯河",
            LUOYANG: "洛阳",
            LUXI: "潞西",
            LUZHOU: "泸州",
            LVLIANG: "吕梁",
            LVSHUN: "旅顺",
            MAANSHAN: "马鞍山",
            MAOMING: "茂名",
            MEIHEKOU: "梅河口",
            MEISHAN: "眉山",
            MEIZHOU: "梅州",
            MIANXIAN: "勉县",
            MIANYANG: "绵阳",
            MUDANJIANG: "牡丹江",
            NANAN: "南安",
            NANCHANG: "南昌",
            NANCHONG: "南充",
            NANJING: "南京",
            NANNING: "南宁",
            NANPING: "南平",
            NANTONG: "南通",
            NANYANG: "南阳",
            NEIJIANG: "内江",
            NINGBO: "宁波",
            NINGDE: "宁德",
            PANJIN: "盘锦",
            PANZHIHUA: "攀枝花",
            PENGLAI: "蓬莱",
            PINGDINGSHAN: "平顶山",
            PINGDU: "平度",
            PINGHU: "平湖",
            PINGLIANG: "平凉",
            PINGXIANG: "萍乡",
            PULANDIAN: "普兰店",
            PUNING: "普宁",
            PUTIAN: "莆田",
            PUYANG: "濮阳",
            QIANNAN: "黔南",
            QIDONG: "启东",
            QINGDAO: "青岛",
            QINGYANG: "庆阳",
            QINGYUAN: "清远",
            QINGZHOU: "青州",
            QINHUANGDAO: "秦皇岛",
            QINZHOU: "钦州",
            QIONGHAI: "琼海",
            QIQIHAER: "齐齐哈尔",
            QUANZHOU: "泉州",
            QUJING: "曲靖",
            QUZHOU: "衢州",
            RIKAZE: "日喀则",
            RIZHAO: "日照",
            RONGCHENG: "荣成",
            RUGAO: "如皋",
            RUIAN: "瑞安",
            RUSHAN: "乳山",
            SANMENXIA: "三门峡",
            SANMING: "三明",
            SANYA: "三亚",
            XIAMEN: "厦门",
            SHAN: "佛山",
            SHANGLUO: "商洛",
            SHANGQIU: "商丘",
            SHANGRAO: "上饶",
            SHANGYU: "上虞",
            SHANTOU: "汕头",
            ANKANG: "安康",
            SHAOGUAN: "韶关",
            SHAOXING: "绍兴",
            SHAOYANG: "邵阳",
            SHENYANG: "沈阳",
            SHENZHEN: "深圳",
            SHIHEZI: "石河子",
            SHIJIAZHUANG: "石家庄",
            SHILIN: "石林",
            SHISHI: "石狮",
            SHIYAN: "十堰",
            SHOUGUANG: "寿光",
            SHUANGYASHAN: "双鸭山",
            SHUOZHOU: "朔州",
            SHUYANG: "沭阳",
            SIMAO: "思茅",
            SIPING: "四平",
            SONGYUAN: "松原",
            SUINING: "遂宁",
            SUIZHOU: "随州",
            SUZHOU: "苏州",
            TACHENG: "塔城",
            TAIAN: "泰安",
            TAICANG: "太仓",
            TAIXING: "泰兴",
            TAIYUAN: "太原",
            TAIZHOU: "泰州",
            TAIZHOU1: "台州",
            TANGSHAN: "唐山",
            TENGCHONG: "腾冲",
            TENGZHOU: "滕州",
            TIANMEN: "天门",
            TIANSHUI: "天水",
            TIELING: "铁岭",
            TONGCHUAN: "铜川",
            TONGLIAO: "通辽",
            TONGLING: "铜陵",
            TONGLU: "桐庐",
            TONGREN: "铜仁",
            TONGXIANG: "桐乡",
            TONGZHOU: "通州",
            TONGHUA: "通化",
            TULUFAN: "吐鲁番",
            WAFANGDIAN: "瓦房店",
            WEIFANG: "潍坊",
            WEIHAI: "威海",
            WEINAN: "渭南",
            WENDENG: "文登",
            WENLING: "温岭",
            WENZHOU: "温州",
            WUHAI: "乌海",
            WUHAN: "武汉",
            WUHU: "芜湖",
            WUJIANG: "吴江",
            WULANHAOTE: "乌兰浩特",
            WUWEI: "武威",
            WUXI: "无锡",
            WUZHOU: "梧州",
            XIAN: "西安",
            XIANGCHENG: "项城",
            XIANGFAN: "襄樊",
            XIANGGELILA: "香格里拉",
            XIANGSHAN: "象山",
            XIANGTAN: "湘潭",
            XIANGXIANG: "湘乡",
            XIANNING: "咸宁",
            XIANTAO: "仙桃",
            XIANYANG: "咸阳",
            XICANG: "西藏",
            XICHANG: "西昌",
            XINGTAI: "邢台",
            XINGYI: "兴义",
            XINING: "西宁",
            XINXIANG: "新乡",
            XINYANG: "信阳",
            XINYU: "新余",
            XINZHOU: "忻州",
            SUQIAN: "宿迁",
            SUYU: "宿豫",
            SUZHOU1: "宿州",
            XUANCHENG: "宣城",
            XUCHANG: "许昌",
            XUZHOU: "徐州",
            YAAN: "雅安",
            YAKESHI: "牙克石",
            YANAN: "延安",
            YANBIAN: "延边",
            YANCHENG: "盐城",
            YANGJIANG: "阳江",
            YANGQUAN: "阳泉",
            YANGZHOU: "扬州",
            YANJI: "延吉",
            YANTAI: "烟台",
            YANZHOU: "兖州",
            YIBIN: "宜宾",
            YICHANG: "宜昌",
            YICHUN: "宜春",
            YICHUN1: "伊春",
            YILI: "伊犁",
            YINCHUAN: "银川",
            YINGKOU: "营口",
            YINGTAN: "鹰潭",
            YINING: "伊宁",
            YIWU: "义乌",
            YIXING: "宜兴",
            YIYANG: "益阳",
            YONGKANG: "永康",
            YONGZHOU: "永州",
            YUEYANG: "岳阳",
            YUHUAN: "玉环",
            YULIN1: "榆林",
            YULIN: "玉林",
            YUNCHENG: "运城",
            YUXI: "玉溪",
            YUYAO: "余姚",
            ZAOZHUANG: "枣庄",
            ZENGCHENG: "增城",
            CHANGCHUN: "长春",
            CHANGHAI: "长海",
            ZHANGJIAGANG: "张家港",
            ZHANGJIAJIE: "张家界",
            ZHANGJIAKOU: "张家口",
            CHANGLE: "长乐",
            ZHANGQIU: "章丘",
            CHANGSHA: "长沙",
            ZHANGYE: "张掖",
            CHANGZHI: "长治",
            ZHANGZHOU: "漳州",
            ZHANJIANG: "湛江",
            ZHAODONG: "肇东",
            ZHAOQING: "肇庆",
            ZHAOTONG: "昭通",
            ZHENGZHOU: "郑州",
            ZHENJIANG: "镇江",
            ZHONGSHAN: "中山",
            ZHOUKOU: "周口",
            ZHOUSHAN: "舟山",
            ZHUCHENG: "诸城",
            ZHUHAI: "珠海",
            ZHUJI: "诸暨",
            ZHUMADIAN: "驻马店",
            ZHUZHOU: "株洲",
            ZIBO: "淄博",
            ZIGONG: "自贡",
            ZUNYI: "遵义",
            WULUMUQI: "乌鲁木齐",
            FUQING: "福清",
            EZHOU: "鄂州",
            BAOTOU: "包头",
            XIAOSHAN: "萧山",
            XUANHUA: "宣化",
            JIANGYOU: "江油",
            ZIYANG: "资阳",
            XINJI: "辛集",
            FOSHAN: "佛山",
            WANZHOU: "万州",
            ZOUCHENG: "邹城",
            SHAOWU: "邵武",
            JIANGYAN: "姜堰",
            XIANGYIN: "湘阴",
            SONGJIANG: "松江",
            QITAIHE: "七台河",
            LILING: "醴陵",
            FULING: "涪陵",
            GONGZHULING: "公主岭",
            SHEXIAN: "歙县",
            XINGHUA : "兴化"
        };

        //city points with chinese name
        var points = [];
        temperature.forEach(function (d) {
            if (typeof enToCn[d[0]] !== 'undefined') {
                points.push({
                    'name': enToCn[d[0]],
                    'time': d[2] + "-" + d[1],
                    'value': d[3],
                    'pingyin': d[0]
                });
            }
        });
        //console.log(points.length);

        //temperature range
        var pointColor = d3.scale.linear()
                    .domain(d3.extent(temperature.map(function (d) {return d[3];})))
                    .range(["steelblue", "red"]);

        var chinamap = new Chinamap("chart", {
                'width': 720,
                'height': 600,
                "geoDataPath": '../../lib/charts/data/chinaMap/'
                });
        chinamap.setOptions({'showWords': false});
        chinamap.setOptions({'levelChangeable': false});
        chinamap.setOptions({'mapId': 0});

        chinamap.setOptions({
            //"wordStyle": {'stroke': "black"},
            //"colorModel": "gradient",
            //"colors": ["#ddd", "#88f"]
        });
        //2010 人口统计
        chinamap.setSource();

        chinamap.on('areaHoverIn', function () {
            var map = this.data("map");
            var word = this.data("word");
            var info = this.data("info");
            this.attr({"fill": "pink"});
        });
        chinamap.on('areaHoverOut', function () {
            var map = this.data("map");
            var word = this.data("word");
            var info = this.data("info");
            this.attr({"fill": info.fillColor});
        });

        chinamap.renderCallback = function () {
            var searchP = chinamap.createCityPoints(points, function (city) {
                        return this.paper.circle(city.coord[0], city.coord[1], 20)
                            .attr({
                                "fill": pointColor(city.value),
                                "fill-opacity": 0.5
                                })
                            .data("map", this)
                            .mouseover(function () {
                                    this.attr({"r": 40});
                                    this.data("map").floatTag
                                    .html("<p>" + city.formatName + " (" + city.pingyin + ")" + "</p>"
                                        + "<p>" + city.time + "</p>"
                                        + "<p>" + Math.round(city.value * 100) / 100 + "℃</p>")
                                    .css("visibility", "visible");
                                })
                            .mouseout(function () {
                                    this.attr({"r": 20});
                                    this.data("map").floatTag
                                    .css("visibility", "hidden");
                                });
                    });
            searchP.forEach(function (d) {
                    d.attr({"stroke": "none"});
                    });
            //console.log(searchP.length);
            chinamap.floatTag.creator.mouseToFloatTag({x: 10, y: 10});
            legendCreator();
        };
        chinamap.render();

    </script>

    <script>
        //legend
        var legendCreator = function () {
            var legend = $("<div/>")
                .css({"position": "absolute",
                        "left": 0,
                        "top": 470})
                .appendTo($("#chart").css("position", "relative"));
            var colorScale = pointColor;
            var domain = colorScale.domain();
            var range = colorScale.range();
            var config = {'w': 280, 'h': 100};
            var legendPaper = new Raphael(legend[0], config.w, config.h);
            legendPaper.rect(0, 0, config.w, config.h).attr({"fill": "#eee"});
            legendPaper.text(config.w / 2, 30, "温差(℃)")
                .attr({"fill": "black",
                        "font-size": "15px",
                        "font-family": "微软雅黑"});
            legendPaper.rect(40, (config.h - 40) / 2 + 20, config.w - 40 * 2, 40).attr({
                    "fill": "0-steelblue:5-red:95",
                    "fill-opacity": 0.5,
                    "stroke": "none"
            });
            legendPaper.text(20, config.h / 2 + 20, d3.format(".2f")(domain[0]));
            legendPaper.text(config.w - 20, config.h / 2 + 20, d3.format(".2f")(domain[1]));
        };
    </script>

  </body>
</html>
